package com.weixing.mall.provider.controller.admin;

import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.base.wrapper.ResultUtil;
import com.weixing.mall.provider.service.IErpGoodsSyncService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@EnableAsync
@RestController
@RequestMapping("erpSync")
@Api(value = "ERP商品同步仓库", tags = "ERP商品同步仓库")
public class ErpGoodSyncController {
    @Autowired
    private IErpGoodsSyncService erpGoodsSyncService;

    @ApiOperation(value = "ERP商品同步")
    @GetMapping("")
    public Result syncErpGoodsToProductStock(){
        erpGoodsSyncService.syncErpGoodsToProductStock();
        return ResultUtil.success();
    }

}
